package com.mingqi.enetconnected.net.util;

import android.util.Log;

import com.lzy.okgo.OkGo;
import com.lzy.okgo.callback.Callback;
import com.lzy.okgo.model.Response;
import com.mingqi.enetconnected.net.callback.JsonCallback;

/**
 * Created by li on 2018/8/8.
 * WeChat 18571658038
 * author LiWei
 */

public class NetUtils {

    public static  <T> void getData(String url,String param,Callback<T> callback){

        OkGo.<T>get(url)
                .headers("",param)
                .execute(callback);
    }

    public static void main(String[] args){

        getData("", "",
                new JsonCallback<String>() {
                    @Override
                    public void onSuccess(Response<String> response) {
                        Log.d("--TAG--", "NetUtils onSuccess()" + "");
                    }
                });
    }
}
